<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/bigjo/js/jquery.js"></script>
<title>Insert title here</title>
</head>
<style type="text/css">
	table{
		color:#A51263;
		text-align: center;
		border: 1px;
	}
	#detailList{
	 	margin-top:50px;
	}
	td{
		margin: 100px;
		text-align: center;
	}
	
	#area{
		position: absolute;
	}
	
	#areadiv{
		position:relative;
		margin:auto;
		width: 20Em;
		height: 100px;
	}
	#replydiv{
		position:relative;
		margin:auto;
		width: 17Em;
		height: 100px;
	}
	
</style>

<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
	jQuery("#replytag").click(function(){
		var idx = document.URL.indexOf("bigjo");
		var str = document.URL.substring(0,idx+5);
		var sb_no = jQuery("#detailsb_no").val();
		alert(sb_no);
		jQuery.ajax({
			url: str+"/sBoardReplyList.reply?sb_no="+sb_no,
			error:function(data){
				alert("오류 발생");
			},
			success : function(data){
				jQuery(".reply").html(data);
			}
		});
	})
});

</script>

<body>
<jsp:include page="/upMenu.main"></jsp:include>
<form>
	<table align="center" id="detailList">
		<tbody>
		<tr>
		<c:forEach var="detail" items="${detail}">
			<td>${detail.rank}</td>
			<td>${detail.sb_m_id}</td>
			<td>${detail.sb_title}</td>
			<tr><td colspan="3">${detail.sb_context}</td></tr>
		</c:forEach>
		<tr>
		</tbody>
	</table>
	<div id="replydiv">
		<input type="hidden" id="detailsb_no" value="${sb_no}">
	<a id="replytag">댓글보기</a>
		<div id="reply" class="reply"></div>
	</div>
</form>
</body>
</html>